﻿document.onreadystatechange = function () {
    if (document.readyState == "complete") {
        document.getElementById('loading').style.display = 'none';
        document.getElementById('MainFrame').style.display = '';
        // MenuNavToggle(document.getElementById("tdleft"), document.getElementById("leftMenuId"));
    }
}

function ClickYC() {
    TopBarToggle(document.getElementById('trtop'), this);
    resizeWindow();
}
$(function () {
    $(window).resize(function () {
        resizeWindow();
    });
    SystemSkinName = Current.Skin;
    Class_SystemLoad.Init_ItemCard();

    var winH = $(window).height() - 163;

    //var winH = document.body.clientHeight - 163;
    if (winH > 0) {
        document.getElementById("tbmid").style.height = winH + "px";

        document.getElementById("ifr_left").style.height = (winH - 18) + "px";

        document.getElementById("maincon").style.height = (winH + 8) + "px";

        document.getElementById("Item_Card_Iframe").style.height = (winH + 8 - 31) + "px";
    }
})

function resizeWindow() {
    var winH = $(window).height(); //document.body.clientHeight;  //
    var hx = winH;
    var h = winH + "px";
    if (hx > 0) {
        document.getElementById("maindiv").style.height = h.toString();
        //查看是否显示
        var topDis = document.getElementById("trtop").style.display;
        var toph = 0;

        if (topDis == "none") {
        } else {
            toph = 90;  //document.getElementById("trtop").style.height;
            //  toph = $("#trtop").height();
        }
        document.getElementById("tbmid").style.height = (hx - 73 - toph) + "px";
        document.getElementById("ifr_left").style.height = (hx - 73 - toph - 18) + "px";
        document.getElementById("maincon").style.height = (hx - 73 - toph + 8) + "px";
        document.getElementById("Item_Card_Iframe").style.height = (hx - 73 - toph + 8 - 31) + "px";
    }
};